Specify External Resources for a Test
Source code
'************************************************************************************************************************
'Description:
'
'This example opens a new test and configures the resources for the test.
'
'Assumptions:
'There is no unsaved test currently open in UFT One.
'For more information, see the example for the Test.SaveAs method.
'************************************************************************************************************************

Dim qtApp 'As QuickTest.Application ' Declare the Application object variable
Dim qtTestResources 'As QuickTest.Resources ' Declare a Resources object variable

Set qtApp = CreateObject("QuickTest.Application") ' Create the Application object
qtApp.Launch ' Start UFT One
qtApp.Visible = True ' Make the UFT One application visible
qtApp.New ' Open a new test

' Return the Resources object
Set qtTestResources = qtApp.Test.Settings.Resources

' Specify an external Data Table file
qtTestResources.DataTablePath = "C:\Resources\Default.xls"

Set qtTestResources = Nothing ' Release the Resources object
Set qtApp = Nothing ' Release the Application object